<form id="action-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">订单状态:</label>
        <div class="col-xs-12 col-sm-8">
            <select  title="没有选中任何项" id="c-fk_bdl_orderstatus" class="form-control selectpicker" name="row[fk_bdl_orderstatus]">
                {foreach name='statusList' item='vo'}
                <option  {in name="key" value="$row.fk_bdl_orderstatus"} selected {/in}  value="{$key}">{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>

    {if $row.fk_bdl_orderstatus eq 1}

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">业务员确认时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_confirmtime1" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" type="text" name="row[fk_bdl_confirmtime]" value="{$row.fk_bdl_confirmtime}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">总金额:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_allamount1" class="form-control"   type="text" name="row[fk_bdl_allamount]" value="{$row.fk_bdl_allamount}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">审核备注:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_confirm2time1" class="form-control" type="text" name="row[fk_bdl_auditcomment]" value="{$row.fk_bdl_auditcomment}">
        </div>
    </div>



    {else}



    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">业务员确认时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_commenta1" class="form-control"   type="text" value="{$row.fk_bdl_confirmtime}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">总金额:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_commenta2" class="form-control"   type="text" value="{$row.fk_bdl_allamount}">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">审核备注:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_confirm2ti2me1" class="form-control" type="text"  name="row[fk_bdl_auditcomment]" value="{$row.fk_bdl_auditcomment}">
        </div>
    </div>
    {/if}

    {if $row.fk_bdl_ordertype == 1}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">分组名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_comme1nta" class="form-control" readonly  type="text" value="{$row.cate.fname}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">分组编码:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_2commenta" class="form-control" readonly  type="text" value="{$row.cate.fnumber}">
        </div>
    </div>

    {/if}


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">订单备注:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_comment" class="form-control" readonly  type="text" value="{$row.fk_bdl_comment}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">下单时间:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_ordertime" class="form-control" readonly  type="text" value="{$row.fk_bdl_ordertime}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">总数量:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-fk_bdl_allqty" class="form-control" readonly  type="text" value="{$row.fk_bdl_allqty|floatval}">
        </div>
    </div>



<!--    ------------->

        {if $row.fk_bdl_ordertype == 2}
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-12">
                    <div class="alert alert-success-light">
                        <b>产品信息</b><br>
                    </div>
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>产品名称</th>
                            <th>编码</th>
                            <th>数量</th>
                            <th>表面</th>
                            <th>材质</th>
                            <th>其他属性</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name='row.orderentrynew' id='item'}
                        <tr>
                            <td>{$item.material.fname}</td>
                            <td>{$item.material.fnumber}</td>
                            <td>{$item.fk_bdl_qty}</td>
                            <td>{$item.inventoryone.surfaceone.fname}</td>
                            <td>{$item.inventoryone.textureone.fname}</td>
                            <td>
                                {volist name='item.inventoryone.inventoryentryvalue' id='son'}
                                {$son.fname}*{$son.pivot.fk_bdl_matpropvalue} <br>
                                {/volist}

                            </td>
                        </tr>
                        {/volist}

                        </tbody>
                    </table>
                </div>
            </div>
        {elseif condition="$row.fk_bdl_ordertype == 1"/}

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-12">
                    <div class="alert alert-success-light">
                        <b>产品信息</b><br>
                    </div>
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>表面</th>
                            <th>材质</th>
                            <th>图片</th>
                            <th>属性</th>
                        </tr>
                        </thead>
                        <tbody>
                        {volist name='row.show_mes.mater' id='item'}

                        <tr>

                            <td>{$item.fk_bdl_bd_surface}</td>
                            <td>{$item.fk_bdl_bd_texture}</td>
                            <td><img src="{$item.show_image}" style="width: 160px" alt=""></td>

                            <td>
                                <table class="table table-striped">
                                    <thead>
                                    <tr>
                                        <th>厚</th>
                                        <th>宽</th>
                                        <th>长</th>
                                        <th>数量</th>
                                    </tr>
                                    </thead>
                                    {volist name='item.infos' id='son'}
                                    <tr>
                                        <td>{$son.fk_bdl_refthickness|floatval}</td>
                                        <td>{$son.fk_bdl_length|floatval}</td>
                                        <td>{$son.fk_bdl_width|floatval}</td>
                                        <td>{$son.fk_bdl_qty|floatval}</td>
                                    </tr>
                                    {/volist}
                                </table>
                            </td>

                        </tr>
                        {/volist}

                        </tbody>
                    </table>
                </div>
            </div>

        {/if}









    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">确定</button>
            <button type="reset" class="btn btn-default btn-embossed">重置</button>
        </div>
    </div>
</form>
